
************************************************************************************************************
**#							TABLE 8 - COMPONENTS OF THE PAY RATIO AND EMPLOYEE RESPONSE
************************************************************************************************************

capture cd "/Users/joshw/CEO Pay Ratio/Analysis/"
use "Data/Temp/dataset_main.dta",clear

***********************
*Panel A Correlation
***********************
pwcorr ln_pr ceo_quint_5 ceo_quint_1 me_quint_5 me_quint_1, star(0.01)

***********************
*Panel B Employees
***********************
est clear
eststo: xi: reghdfe gd_pay_diff_365 ln_pr ceo_quint_5 ceo_quint_1 me_quint_5 me_quint_1 gd_pay_pre_365 size mtb roa io cash lev salesg_w tsr union rd if sample_yr==1, absorb(ffi49)
eststo: xi: reghdfe gd_pay_diff_365 ln_pr ceo_quint_5 ceo_quint_1 me_quint_5 me_quint_1 gd_pay_pre_365 size mtb roa io cash lev salesg_w tsr union rd if sample_yr!=1, absorb(indyr)
eststo: xi: reghdfe ln_prod_diff ln_pr ceo_quint_5 ceo_quint_1 me_quint_5 me_quint_1 ln_prod_pre_365 size mtb roa io cash lev salesg_w tsr union rd fixed_assets if sample_yr==1, absorb(ffi49)
eststo: xi: reghdfe ln_prod_diff ln_pr ceo_quint_5 ceo_quint_1 me_quint_5 me_quint_1 ln_prod_pre_365 size mtb roa io cash lev salesg_w tsr union rd fixed_assets if sample_yr!=1, absorb(indyr)
eststo: xi: reghdfe gd_ceodis_diff_365 ln_pr ceo_quint_5 ceo_quint_1 me_quint_5 me_quint_1 gd_ceodis_pre_365 size mtb roa io cash lev salesg_w tsr union rd if sample_yr==1, absorb(ffi49)
eststo: xi: reghdfe gd_ceodis_diff_365 ln_pr ceo_quint_5 ceo_quint_1 me_quint_5 me_quint_1 gd_ceodis_pre_365 size mtb roa io cash lev salesg_w tsr union rd if sample_yr!=1, absorb(indyr)
esttab using "Output/Tables/RF/T8_components_ratio_emp.csv", b(3) ar2 varwidth(25) title("Components of pay ratio and employees")  order(ln_pr ceo_quint_5 ceo_quint_1 me_quint_5 me_quint_1 gd_pay_pre_365 ln_prod_pre_365 gd_ceodis_pre_365 size mtb roa io cash lev salesg_w tsr union rd fixed_assets) star(* 0.10 ** 0.05  *** 0.01 ) drop(_cons) replace
